PFB.txt
9/3/94

PFB 1.2 (aka Pico, Fermi, Bagels)
a number guessing game

Copyright 1993, 1994, S. Weyer, All Rights Reserved Worldwide.

Keywords: game, strategy, numbers, source

Dedicated to Kristina and Ellie

PFB is "postcardware"; if you like it, I ask that you send email to my kids
(America Online: Krisbo and EllieJelly; internet: EllieJelly@aol.com,
Krisbo@aol.com), postcards, and/or other valuable tokens of appreciation.

PFB may be freely distributed via online services and bulletin boards if it is
unmodified and includes the file PFB.txt. It may not be commercially bundled
or redistributed on CD-ROM, floppy disk, PCMCIA, networks or other media
without my permission.

If you are interested in object-oriented programming in NewtonScript,
developing applications on your Newton, or graphical (turtle) environments,
try my shareware package "Newt" (newt-devenv-23.sit /.hqx). If you register
for Newt ($35 version 2.3), you will receive a manual describing additional
features, a mini-tutorial on NewtonScript; plus, picoferm.nwt, the PFB
application source text, and NewtPFB, an interactive book tutorial (like
NewtATut), that describes and implements PFB step by step.


Author:
Stephen Weyer
17 Timber Knoll Drive
Washington Crossing, PA 18977-1052
Internet: weyer@guest.apple.com
America Online/eWorld/NewtonMail: SteveWeyer
Compuserve: 74603,2051
AppleLink: WEYER.S


Revision History:
-----
1.2 (9/3/94)
- see PFB.1st

1.1 (3/2/94)
- new, non-generic icon
- autoconfigures for new (smaller) MessagePad screens
- changed from "freeware" to "postcardware"
- minor cosmetic changes to interface and messages; code cleanup
- source code available to Newt users

1.0d2 (9/29/93)
- initial public version (my first Newton program)


Help
----

For each guess, you will see one or more of
- Fermi: a correct digit placed correctly
- Pico: a correct digit placed incorrectly
- Bagels: no digits are correct

e.g., if <Allow Zero> is checked, <Digits>=3
and the computer's number is 029
  445  <4 duplicate>
  4567 <not 3 digits>
  376  Bagels
  914  Pico
  820  Fermi Pico
  . . .
  092  Fermi Pico Pico
  029  Fermi Fermi Fermi

Notes: Unlike MasterMind, PFB does not allow duplicate digits. Although
I had played versions of PFB where "Pico" and "Fermi" were reversed,
the kids convinced me it was easier to remember "Fermi" by "firm".


Additional Information
-----

PFB is similar in concept and strategy to MasterMind and Jotto.  After I first
saw "Pico Fermi Bagels" (PFB) as a Basic program at the Lawrence Hall of
Science in Berkeley in the early '70s, I wrote several Logo versions.

Uncheck "Allow Zero" to omit zero as a possible digit.

Select "Digits" to change the number of digits (between 2-5).

Selecting either of these after you have made your first guess starts a New
Game. Your last settings of these should reappear the next time you start PFB
(though these don't survive Newton resets).

The guess fields expect numbers, but will ignore spaces and periods.  Doubletap
for a numeric keypad. PFB  will complain about non-digits (or zero if "Allow
Zero" is unchecked), the wrong number of digits, or duplicate digits.

Order of guesses doesn't matter; guesses can be recycled (may be necessary
since there are only 16 guess fields -- a protoRollBrowser limit unless I add
scrolling).

To balance readability and amount of information displayed, guess field changes
font size:
- userFont12 (Digits=2,3)
- userFont10 (Digits=4)
- userFont9 (Digits=5) [long line may still not quite be all visible]

Winning is indicated by "Fermi" for all digits, and an audible sound. 


Possible Next Steps:
-----
- allow more guesses (via scrolling) [for now, recycle guesses]
- provide feedback via the label (instead of in value field)?
- autoexpanding the next guess field (but expandLine doesn't refresh properly?)
- add preferences to system soup entry (doesn't seem worth the bother)
